//
//  MCAfterSaleDetailFooter_itemView.swift
//  StoreManage
//
//  Created by MC on 2018/2/2.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCAfterSaleDetailFooter_selectedView: UIView {
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.backgroundColor = UIColor.white

        
        self.addSubview(lineView)
        lineView.snp.remakeConstraints { (make) ->Void in
            make.left.right.bottom.equalTo(0)
            make.height.equalTo(1)
        }
        
        self.addSubview(nameLabel)
        nameLabel.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(0)
            make.centerY.equalTo(self)
        }
        
        self.addSubview(selectedButton)
        selectedButton.snp.remakeConstraints { (make) ->Void in
            make.centerY.equalTo(self)
            make.right.equalTo(0)
            make.size.equalTo(CGSize.init(width: 40, height: 40))
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    lazy var lineView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.MCGray_light
        return view
    }()
    
    
    public lazy var nameLabel: UILabel = {
        let label = UILabel.init()
        label.font = MCFont(14)
        label.textColor = UIColor.black
        return label
    }()
    
    
    public lazy var selectedButton: UIButton = {
        let button = UIButton.init(type: UIButtonType.custom)
        button.setImage(#imageLiteral(resourceName: "GoodsManage_notSelected"), for: UIControlState.normal)
        button.setImage(#imageLiteral(resourceName: "GoodsManage_selected"), for: UIControlState.selected)
        button.contentHorizontalAlignment = UIControlContentHorizontalAlignment.right
        return button
    }()
}

